package com.bgs.eat.evaluate.controller;

import com.bgs.eat.config.CommonResult;
import com.bgs.eat.evaluate.entity.EvaluateEntity;
import com.bgs.eat.evaluate.service.EvaluateService;
import com.bgs.eat.userAddress.entity.UserAddressEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName EvaluateController
 * @Description TODO
 * @Author hbx
 * @Date 2022/10/31 14:52
 **/
@RestController
@RequestMapping("/evaluate")
@CrossOrigin
public class EvaluateController {

    @Autowired
    EvaluateService evaluateService;

    /**
    * @Author hbx
    * @Description 新增评论
    * @Date 2022/11/1 10:18
    * @param evaluateEntity
    */
    @PostMapping("/submitForPublication")
    public CommonResult submitForPublication(@RequestBody EvaluateEntity evaluateEntity){
        return CommonResult.ok(evaluateService.submitForPublication(evaluateEntity));
    }
}
